/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2023-09-17
 * Time: 17:28
 */
//使用lambda表达式，来表示run方法的内容
public class Demo5 {
    public static void main(String[] args) throws InterruptedException {
        Thread t=new Thread(() ->{
           while(true){
               try {
                   Thread.sleep(1000);
               } catch (InterruptedException e) {
                   e.printStackTrace();
               }
               System.out.println("这里是进程1");
           }
        },"mythread");

        t.start();
    }
}
